---
apiVersion: v1
kind: Service
metadata:
  name: storm-worker
  namespace: spark-cluster
spec:
  ports:
  - name: '6700'
    port: 6700
  - name: '6701'
    port: 6701
  - name: '6702'
    port: 6702
  - name: '6703'
    port: 6703
  - name: '22'
    port: 22
  selector:
    name: storm-worker

---
apiVersion: v1
kind: ReplicationController
metadata: 
  name: storm-worker
  namespace: spark-cluster
spec: 
  replicas: 2
  template: 
    metadata: 
      labels: 
        name: storm-worker
        uses: nimbus
    spec: 
      containers: 
      - name: storm-worker
        image: index.tenxcloud.com/zhangshun/storm-worker:1.0.2
        ports:
        - containerPort: 6700
        - containerPort: 6701
        - containerPort: 6702
        - containerPort: 6703
        - containerPort: 22
        env:
        - name: ZOOKEEPER_SERVICE_HOST
          value: kafka-zoo-svc
        - name: NIMBUS_SERVICE_HOST
          value: storm-nimbus

        resources: 
            limits: 
              cpu: 200m
            
          
